package com.sc.nft.entity.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.DaoEcologyPointsDetailRecordsTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class PageDaoPointsTransferRecordsVO {

    @ApiModelProperty(value = "daoId")
    private Long daoId;

    @ApiModelProperty(value = "金额")
    private String amount;

    @ApiModelProperty(value = "dao名称")
    private String daoName;

    @ApiModelProperty(value = "类型 TRANSFER_OUT_TO_MARKET_VALUE_ACCOUNT:转至市值账号")
    private DaoEcologyPointsDetailRecordsTypeEnum type;

    @ApiModelProperty(value = "市值手机号")
    private String userTel;

    @ApiModelProperty(value = "时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public void setAmount(BigDecimal amount) {
        this.amount = amount.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
